home *** CD-ROM | disk | FTP | other *** search
/ Deep Throat Girls 5 / Deep Throat Girls 5.iso / mac / MAC.Dir / 00036_alien.ls < prev    next >
Encoding:
Text File  |  1997-02-09  |  10.8 KB  |  355 lines

  1. on alien
  2.   global alienx, alieny, kazi, direct, temp, dive, sweep, diverx, divery, alienup, count, alienship, kazix, kaziy, alienblow, clear, collide, shoot1, shoot2, shoot3, shoot4, level, shipcast, shoot1x, shoot2x, shoot3x, shoot4x, shoot1y, shoot2y, shoot3y, shoot4y
  3.   repeat with q = 1 to 33
  4.     if q <> kazi then
  5.       set temp to getAt(alienx, q)
  6.       deleteAt(alienx, q)
  7.       addAt(alienx, q, temp + (direct * 2))
  8.     end if
  9.   end repeat
  10.   set diverx to diverx + (direct * 2)
  11.   if (dive > -1) and (dive < 20) then
  12.     set dive to dive + 1
  13.   else
  14.     if dive = 20 then
  15.       set sweep to 1.0 / (random(20) + 10.0)
  16.       set temp to random(33)
  17.       if getAt(alienblow, temp) = 6 then
  18.         set kazi to temp
  19.         set diverx to getAt(alienx, kazi)
  20.         set divery to getAt(alieny, kazi)
  21.         set dive to 21
  22.       else
  23.         set temp to 0
  24.       end if
  25.     else
  26.       if dive > 20 then
  27.         set dive to dive + sweep
  28.         set temp to getAt(alienx, kazi)
  29.         deleteAt(alienx, kazi)
  30.         set kazix to 12.0 * cos(PI * (dive - 20))
  31.         addAt(alienx, kazi, temp + kazix)
  32.         set temp to getAt(alieny, kazi)
  33.         deleteAt(alieny, kazi)
  34.         set kaziy to (8.0 * abs(sin(PI * (dive - 20)))) + 1.0
  35.         addAt(alieny, kazi, temp + kaziy)
  36.         if (getAt(alieny, kazi) > 315) and (getAt(alieny, kazi) < 365) and (getAt(alienblow, kazi) = 6) and (shipcast = 1) and sprite (kazi + 2) intersects 40 then
  37.           set collide to 1
  38.           set the castNum of sprite (kazi + 2) to 7
  39.           deleteAt(alienblow, kazi)
  40.           addAt(alienblow, kazi, 7)
  41.         end if
  42.         if getAt(alieny, kazi) > 500 then
  43.           set dive to -1
  44.         end if
  45.       else
  46.         if dive = -1 then
  47.           deleteAt(alienx, kazi)
  48.           deleteAt(alieny, kazi)
  49.           addAt(alienx, kazi, diverx)
  50.           addAt(alieny, kazi, -10)
  51.           set dive to -2
  52.         else
  53.           if dive = -2 then
  54.             set temp to getAt(alienx, kazi)
  55.             deleteAt(alienx, kazi)
  56.             addAt(alienx, kazi, temp + (direct * 2))
  57.             set temp to getAt(alieny, kazi)
  58.             deleteAt(alieny, kazi)
  59.             addAt(alieny, kazi, temp + 2.5)
  60.             if getAt(alieny, kazi) = divery then
  61.               set dive to 0
  62.               set kazi to 0
  63.             end if
  64.           end if
  65.         end if
  66.       end if
  67.     end if
  68.   end if
  69.   set column1 to getAt(alienblow, 1) + getAt(alienblow, 2)
  70.   set column2 to getAt(alienblow, 3) + getAt(alienblow, 4) + getAt(alienblow, 5) + getAt(alienblow, 6)
  71.   set column3 to getAt(alienblow, 7) + getAt(alienblow, 8) + getAt(alienblow, 9) + getAt(alienblow, 10)
  72.   set column4 to getAt(alienblow, 11) + getAt(alienblow, 12) + getAt(alienblow, 13) + getAt(alienblow, 14)
  73.   set column5 to getAt(alienblow, 15) + getAt(alienblow, 16) + getAt(alienblow, 17) + getAt(alienblow, 18) + getAt(alienblow, 19)
  74.   set column6 to getAt(alienblow, 20) + getAt(alienblow, 21) + getAt(alienblow, 22) + getAt(alienblow, 23)
  75.   set column7 to getAt(alienblow, 24) + getAt(alienblow, 25) + getAt(alienblow, 26) + getAt(alienblow, 27)
  76.   set column8 to getAt(alienblow, 28) + getAt(alienblow, 29) + getAt(alienblow, 30) + getAt(alienblow, 31)
  77.   set column9 to getAt(alienblow, 32) + getAt(alienblow, 33)
  78.   if column1 > 0 then
  79.     set left to 0
  80.   else
  81.     if column2 > 0 then
  82.       set left to 1
  83.     else
  84.       if column3 > 0 then
  85.         set left to 2
  86.       else
  87.         if column4 > 0 then
  88.           set left to 3
  89.         else
  90.           if column5 > 0 then
  91.             set left to 4
  92.           else
  93.             if column6 > 0 then
  94.               set left to 5
  95.             else
  96.               if column7 > 0 then
  97.                 set left to 6
  98.               else
  99.                 if column8 > 0 then
  100.                   set left to 7
  101.                 else
  102.                   set left to 8
  103.                 end if
  104.               end if
  105.             end if
  106.           end if
  107.         end if
  108.       end if
  109.     end if
  110.   end if
  111.   if column9 > 0 then
  112.     set right to 0
  113.   else
  114.     if column8 > 0 then
  115.       set right to 1
  116.     else
  117.       if column7 > 0 then
  118.         set right to 2
  119.       else
  120.         if column6 > 0 then
  121.           set right to 3
  122.         else
  123.           if column5 > 0 then
  124.             set right to 4
  125.           else
  126.             if column4 > 0 then
  127.               set right to 5
  128.             else
  129.               if column3 > 0 then
  130.                 set right to 6
  131.               else
  132.                 if column2 > 0 then
  133.                   set right to 7
  134.                 else
  135.                   if column1 > 0 then
  136.                     set right to 8
  137.                   else
  138.                     if clear = 0 then
  139.                       set clear to 1
  140.                     end if
  141.                   end if
  142.                 end if
  143.               end if
  144.             end if
  145.           end if
  146.         end if
  147.       end if
  148.     end if
  149.   end if
  150.   if kazi = 1 then
  151.     if diverx < (15 - (35 * left)) then
  152.       set direct to 1
  153.     end if
  154.   else
  155.     if getAt(alienx, 1) < (15 - (35 * left)) then
  156.       set direct to 1
  157.     end if
  158.   end if
  159.   if kazi = 33 then
  160.     if diverx > (577 + (35 * right)) then
  161.       set direct to -1
  162.     end if
  163.   else
  164.     if getAt(alienx, 33) > (577 + (35 * right)) then
  165.       set direct to -1
  166.     end if
  167.   end if
  168.   set count to count + 1
  169.   if count = 7 then
  170.     if alienship = 4 then
  171.       set alienship to 5
  172.     else
  173.       set alienship to 4
  174.     end if
  175.     set count to 1
  176.   end if
  177.   repeat with q = 3 to 35
  178.     set temp to getAt(alienblow, q - 2)
  179.     if temp = 6 then
  180.       if (q = 11) or (q = 12) or (q = 15) or (q = 16) or (q = 20) or (q = 21) or (q = 24) or (q = 25) or (q = 28) or (q = 29) then
  181.         set the castNum of sprite q to alienship
  182.       else
  183.         if (q = 4) or (q = 8) or (q = 10) or (q = 13) or (q = 14) or (q = 18) or (q = 19) or (q = 22) or (q = 23) or (q = 27) or (q = 33) or (q = 35) then
  184.           set the castNum of sprite q to alienship + 2
  185.         else
  186.           if (q = 3) or (q = 5) or (q = 6) or (q = 7) or (q = 9) or (q = 17) or (q = 26) or (q = 30) or (q = 31) or (q = 32) or (q = 34) then
  187.             set the castNum of sprite q to alienship + 4
  188.           end if
  189.         end if
  190.       end if
  191.       set the locH of sprite q to getAt(alienx, q - 2)
  192.       set the locV of sprite q to getAt(alieny, q - 2)
  193.       next repeat
  194.     end if
  195.     if temp = 7 then
  196.       set the castNum of sprite q to 11
  197.       set the locH of sprite q to getAt(alienx, q - 2)
  198.       set the locV of sprite q to getAt(alieny, q - 2)
  199.     else
  200.       if temp = 8 then
  201.         set the castNum of sprite q to 11 + random(2)
  202.         set the locH of sprite q to getAt(alienx, q - 2)
  203.         set the locV of sprite q to getAt(alieny, q - 2)
  204.       else
  205.         if temp = 9 then
  206.           set the castNum of sprite q to 11
  207.           set the locH of sprite q to getAt(alienx, q - 2)
  208.           set the locV of sprite q to getAt(alieny, q - 2)
  209.         else
  210.           if (temp = 10) or (temp = 0) then
  211.             set the castNum of sprite q to 3
  212.             set the locH of sprite q to -50
  213.             set the locV of sprite q to -50
  214.           end if
  215.         end if
  216.       end if
  217.     end if
  218.     set temp to temp + 1
  219.     if temp = 10 then
  220.       deleteAt(alienblow, q - 2)
  221.       addAt(alienblow, q - 2, 0)
  222.       next repeat
  223.     end if
  224.     if (temp = 8) or (temp = 9) then
  225.       deleteAt(alienblow, q - 2)
  226.       addAt(alienblow, q - 2, temp)
  227.     end if
  228.   end repeat
  229.   if (shoot1 = 0) and (kazi > 0) and (random(10) = 1) then
  230.     if getAt(alienblow, kazi) = 6 then
  231.       if soundBusy(2) = 0 then
  232.         puppetSound(2, "DROP")
  233.       end if
  234.       set shoot1 to kazi
  235.       set shoot1x to getAt(alienx, shoot1)
  236.       set shoot1y to getAt(alieny, shoot1) + 10
  237.     else
  238.       set shoot1 to 0
  239.     end if
  240.   end if
  241.   if (shoot2 = 0) and (random(100) < (level * level * 3)) then
  242.     set temp to random(33)
  243.     if getAt(alienblow, temp) = 6 then
  244.       set shoot2 to temp
  245.       if (shoot2 <> shoot1) and (shoot2 <> shoot3) and (shoot2 <> shoot4) then
  246.         if soundBusy(2) = 0 then
  247.           puppetSound(2, "DROP")
  248.         end if
  249.         set shoot2x to getAt(alienx, shoot2)
  250.         set shoot2y to getAt(alieny, shoot2) + 10
  251.       else
  252.         set shoot2 to 0
  253.       end if
  254.     end if
  255.   end if
  256.   if (shoot3 = 0) and (random(100) < (level * level * 3)) then
  257.     set temp to random(33)
  258.     if getAt(alienblow, temp) = 6 then
  259.       set shoot3 to temp
  260.       if (shoot3 <> shoot1) and (shoot3 <> shoot2) and (shoot3 <> shoot4) then
  261.         if soundBusy(2) = 0 then
  262.           puppetSound(2, "DROP")
  263.         end if
  264.         set shoot3x to getAt(alienx, shoot3)
  265.         set shoot3y to getAt(alieny, shoot3) + 10
  266.       else
  267.         set shoot3 to 0
  268.       end if
  269.     end if
  270.   end if
  271.   if (shoot4 = 0) and (random(100) < (level * level * 3)) then
  272.     set temp to random(33)
  273.     if getAt(alienblow, temp) = 6 then
  274.       set shoot4 to temp
  275.       if (shoot4 <> shoot1) and (shoot4 <> shoot2) and (shoot4 <> shoot3) then
  276.         if soundBusy(2) = 0 then
  277.           puppetSound(2, "DROP")
  278.         end if
  279.         set shoot4x to getAt(alienx, shoot4)
  280.         set shoot4y to getAt(alieny, shoot4) + 10
  281.       else
  282.         set shoot4 to 0
  283.       end if
  284.     end if
  285.   end if
  286.   if shoot1 > 0 then
  287.     set shoot1y to shoot1y + 13
  288.     if (shoot1y > 320) and (shoot1y < 360) and (shipcast = 1) and sprite 36 intersects 40 then
  289.       set collide to 1
  290.       set shoot1 to 0
  291.     end if
  292.     if shoot1y > 401 then
  293.       set shoot1 to 0
  294.     end if
  295.     set the castNum of sprite 36 to 10
  296.   else
  297.     set the castNum of sprite 36 to 3
  298.     set shoot1x to 600
  299.     set shoot1y to -50
  300.   end if
  301.   set the locH of sprite 36 to shoot1x
  302.   set the locV of sprite 36 to shoot1y
  303.   if shoot2 > 0 then
  304.     set shoot2y to shoot2y + 7
  305.     if (shoot2y > 320) and (shoot2y < 360) and (shipcast = 1) and sprite 37 intersects 40 then
  306.       set collide to 1
  307.       set shoot2 to 0
  308.     end if
  309.     if shoot2y > 401 then
  310.       set shoot2 to 0
  311.     end if
  312.     set the castNum of sprite 37 to 10
  313.   else
  314.     set the castNum of sprite 37 to 3
  315.     set shoot2x to 600
  316.     set shoot2y to -50
  317.   end if
  318.   set the locH of sprite 37 to shoot2x
  319.   set the locV of sprite 37 to shoot2y
  320.   if shoot3 > 0 then
  321.     set shoot3y to shoot3y + 8
  322.     if (shoot3y > 320) and (shoot3y < 360) and (shipcast = 1) and sprite 38 intersects 40 then
  323.       set collide to 1
  324.       set shoot3 to 0
  325.     end if
  326.     if shoot3y > 401 then
  327.       set shoot3 to 0
  328.     end if
  329.     set the castNum of sprite 38 to 10
  330.   else
  331.     set the castNum of sprite 38 to 3
  332.     set shoot3x to 600
  333.     set shoot3y to -50
  334.   end if
  335.   set the locH of sprite 38 to shoot3x
  336.   set the locV of sprite 38 to shoot3y
  337.   if shoot4 > 0 then
  338.     set shoot4y to shoot4y + 9
  339.     if (shoot4y > 320) and (shoot4y < 360) and (shipcast = 1) and sprite 39 intersects 40 then
  340.       set collide to 1
  341.       set shoot4 to 0
  342.     end if
  343.     if shoot4y > 401 then
  344.       set shoot4 to 0
  345.     end if
  346.     set the castNum of sprite 39 to 10
  347.   else
  348.     set the castNum of sprite 39 to 3
  349.     set shoot4x to 600
  350.     set shoot4y to -50
  351.   end if
  352.   set the locH of sprite 39 to shoot4x
  353.   set the locV of sprite 39 to shoot4y
  354. end
  355.